import json

data = {
    'no': 1111,
    'name': 'zhangsan',
    'age': 18
}

# 写入 JSON 数据
with open('data.json', 'w') as f:
    json.dump(data, f)

# 读取数据
with open('data.json', 'r') as f:
    data = json.load(f)
    print(data)